﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;

namespace BaseHelper.Net
{
     public class PingHelper
    {      //设备-获取-状态
        public static bool Get_Status(string IP)
        {
            Ping ping = new Ping();
            try
            {
                PingReply pingReply = ping.Send(IP,1000);
                return pingReply.Status == IPStatus.Success;
            }
            catch (Exception ex)
            {

            }
            finally
            {
                ping.Dispose();
            }
            return false;
        }
    }
}
